<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="admin" />
        <title>Edit ContactData</title>
    </head>
    <body>
		<div id="center-column">
			<div class="top-bar">
				<h1>Edit ContactData</h1>
				<div class="breadcrumbs">
					<a class="home" href="${resource(dir:'')}">Home</a> / 
					<g:link class="list" action="list">ContactData List</g:link> /
					<g:link class="create" action="create">New ContactData</g:link>
				</div>
			</div><br />
			<div class="select-bar-border-no"></div>
	        <div class="body">
	            <g:form method="post" >
	                <input type="hidden" name="id" value="${contactData?.id}" />
	                <div class="dialog">
						<div class="subdialog">						
		                     <p class="value ${hasErrors(bean:contactData,field:'data','errors')}">
	                             <label for="data">Data:</label>
	                             <input type="text" id="data" name="data" value="${fieldValue(bean:contactData,field:'data')}"/>
		                     </p> 
		                     <p class="value ${hasErrors(bean:contactData,field:'type','errors')}">
	                             <label for="type">Type:</label>
	                             <input type="text" id="type" name="type" value="${fieldValue(bean:contactData,field:'type')}"/>
		                     </p> 
		                     <p class="value ${hasErrors(bean:contactData,field:'user','errors')}">
	                             <label for="user">User:</label>
	                             <g:select optionKey="id" from="${User.list()}" name="user.id" value="${contactData?.user?.id}" ></g:select>
		                     </p>
		            	</div> 
	                </div>
	                <div class="buttons">
	                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
	                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
	                </div>
	            </g:form>
	        </div>
        </div>
		<div id="right-column">
            <g:if test="${flash.message}">
				<strong class="h">INFO</strong>
	            <div class="box">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${group}">
				<strong class="h">ERROR</strong>
                <g:renderErrors bean="${group}" as="list" />
            </g:hasErrors>
		</div>
    </body>
</html>
